﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Coldairarrow.Util.Excel.Model
{
    public class SheetRules
    {
        /// <summary>
        /// EXCEL名称
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// sheet表规则集合
        /// </summary>
        public List<SheetRulesItem> sheetRules { get; set; }
    }
    public class SheetRulesItem
    {
        /// <summary>
        /// sheet表名称
        /// </summary>
        public string sheetName { get; set; }
        /// <summary>
        /// 对应数据库表名
        /// </summary>
        public string dbTableName { get; set; }
        /// <summary>
        /// 数据行开始行索引
        /// </summary>
        public int startRowNum { get; set; }
        /// <summary>
        /// 数据行结束行索引
        /// </summary>
        public int endRowNum { get; set; }
        /// <summary>
        /// 标题行开始索引
        /// </summary>
        public int rowHeadNum { get; set; }
        /// <summary>
        /// 标题行结束索引
        /// </summary>
        public int rowHeadEndNum { get; set; }
        /// <summary>
        /// Sheet页索引
        /// （选填）
        /// </summary>
        public int sheetIndex { get; set; } = -1;
        /// <summary>
        /// 转换模式
        /// 0 为规则表格
        /// 1 为不规则表格
        /// </summary>
        public int parseModel { get; set; } = 0;
        /// <summary>
        /// 验证时是否分析头部标题
        /// </summary>
        public bool isAnalyzeHead { get; set; } = false;
        /// <summary>
        /// 列规则列表集合
        /// </summary>
        public List<columRules> columRules { get; set; }
    }

    public class columRules
    {
        /// <summary>
        /// 列标题名
        /// </summary>
        public string columnName { get; set; }
        /// <summary>
        /// 数据库表列名
        /// </summary>
        public string dbColumnName { get; set; }
        /// <summary>
        /// 列索引
        /// </summary>
        public int columnNum { get; set; }

    }
}
